'use strict';
const md5 = require('md5')
module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert('users', [
      {
        username: '法海',
        password: md5('123456')
      },
      {
        username: '小师妹',
        password: md5('666666')
      }
    ])

    await queryInterface.bulkInsert('contents', [
      {
        user_id: 0,
        title: '妖精，看砵',
        content: '菠萝菠萝蜜'
      },
      {
        user_id: 1,
        title: '你过来呀',
        content: '诶呀，叮叮叮'
      }
    ])
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
  }
};
